package krt.wid.gslzs.base;

import android.content.pm.ActivityInfo;

import butterknife.ButterKnife;
import butterknife.Unbinder;
import krt.wid.base.MBaseActivity;
import krt.wid.gslzs.util.SpUtil;

/**
 * @author Marcus
 * @package krt.wid.gslzs.base
 * @description
 * @time 2018/5/8
 */

public abstract class BaseActivity extends MBaseActivity {
    protected MApplication mApp;
    private Unbinder unBinder;
    protected SpUtil mSpUtil;

    @Override
    public void init() {
        mApp = (MApplication) getApplicationContext();
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); //默认所有activity设置竖屏
        mSpUtil = new SpUtil(this);
    }

    @Override
    public void bindButterKnife() {
        unBinder = ButterKnife.bind(this);
    }

    @Override
    public void unbindButterknife() {
        unBinder.unbind();
    }
}
